/**
 * outsider.com.cn Inc.
 * Copyright (c) 2011-2022 All Rights Reserved.
 */
package com.yuanmeng.common.core.enums;

import lombok.Getter;

/**
 * @author outsider
 * @version Id: StatusEnum.java, v 0.1 2022/6/1 17:16 outsider Exp $$
 */
@Getter
public enum DeleteFlagEnum {
    DELETED("2", "删除"),

    USABLE("0", "可用");

    private String code;

    private String message;

    DeleteFlagEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public static String codeQueryValue(String deleteFlag) {
        for(DeleteFlagEnum ENUM : DeleteFlagEnum.values()) {
            if(ENUM.code.equals(deleteFlag)) {
                return ENUM.getMessage();
            }
        }
        return "";
    }

    public static String valueQueryCode(String deleteFlagValue) {
        for(DeleteFlagEnum ENUM : DeleteFlagEnum.values()) {
            if(ENUM.message.equals(deleteFlagValue)) {
                return ENUM.getCode();
            }
        }
        return "";
    }
}